Skip to content

feat(cli): add --inplace patching to generate-config - #109

Merged
cwasicki merged 1 commit into
frequenz-floss:v0.x.xfrom
cwasicki:inplace
Jul 17, 2026
Merged

feat(cli): add --inplace patching to generate-config#109
cwasicki merged 1 commit into
frequenz-floss:v0.x.xfrom
cwasicki:inplace

Conversation

@cwasicki

Copy link
Copy Markdown
Collaborator

Regenerating a config file from scratch drops its comments and reorders every field (tomllib read + fresh tomlkit rebuild). --inplace instead patches --default via tomlkit.parse(), only inserting missing leaves, so comments, order and formatting survive untouched.

Also render whole-number floats (e.g. peak/rated power) as underscore-grouped ints (1_736_680, not 1736680.0) to match the existing hand-written convention and avoid spurious diffs.

@cwasicki
cwasicki requested review from a team as code owners July 16, 2026 18:17
@cwasicki
cwasicki requested review from cyiallou and llucax and removed request for a team July 16, 2026 18:17
@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests labels Jul 16, 2026
Regenerating a config file from scratch drops its comments and
reorders every field (tomllib read + fresh tomlkit rebuild). --inplace
instead patches --default via tomlkit.parse(), only inserting missing
leaves, so comments, order and formatting survive untouched.

Also render whole-number floats (e.g. peak/rated power) as
underscore-grouped ints (`1_736_680`, not `1736680.0`) to match the
existing hand-written convention and avoid spurious diffs.

Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com>
@cwasicki
cwasicki added this pull request to the merge queue Jul 17, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit b59f4d6 Jul 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants